<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    /*
    边框会影响盒子大小
    子元素都在盒子content内部
    */


    .box1 {
      width: 100px;
      height: 100px;
      background-color: yellowgreen;
      border: #fff solid 1px;
    }
  </style>
</head>
<body>
<div class="box1">

</div>
</body>
</html>